d163e79f6d8041acda1733a786e7b5584068b3a1,src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java,CredentialsProvider,lookupCredentials,#Class#ItemGroup#Authentication#List#,391
Before Change
for (CredentialsProvider provider : all()) {
if (provider.isEnabled(itemGroup) && provider.isApplicable(type)) {
try {
result.addAll(provider.getCredentials(type, itemGroup, authentication, domainRequirements));
} catch (NoClassDefFoundError e) {
LOGGER.log(Level.FINE, "Could not retrieve provider credentials from " + provider
+ " likely due to missing optional dependency", e);
After Change
LOGGER.log(Level.FINE, "Original credentials for resolving: {0}", originals);
return resolver.resolve(originals);
}
List<C> result = new ArrayList<C>();
Set<String> ids = new HashSet<String>();
for (CredentialsProvider provider : all()) {
if (provider.isEnabled(itemGroup) && provider.isApplicable(type)) {
try {
for (C c : provider.getCredentials(type, itemGroup, authentication, domainRequirements)) {
if (!(c instanceof IdCredentials) || ids.add(((IdCredentials) c).getId())) {
// if IdCredentials, only add if we havent added already
// if not IdCredentials, always add
result.add(c);
}
}
} catch (NoClassDefFoundError e) {